import request from '@/utils/request'
// 获取权限列表
export const getpermission = (params) => request({
  url: '/permissions',
  params
})
// 添加父权限
export const addFather = (data) => request({
  url: '/permissions',
  method: 'post',
  data
})
// 根据id获得指定权限
export const addSon = (id) => request({
  url: '/permissions/' + id,
  method: 'get'
})
// 根据id删除权限
export const delpermission = (id) => request({
  url: '/permissions/' + id,
  method: 'delete'
})
//  根据id编辑权限
export const editpermission = (data) => request({
  url: '/permissions/' + data.id,
  method: 'put',
  data
})
// 获取权限的数量
export const getpernumber = () => request({
  url: '/permissions/count'
})
